<template>
    <div class="box">
       <div class="actor">
            <div class="actor-box">
                <div>演职人员</div>
                <div>全部</div>
            </div>
            <ul>
                <li v-for="(item,index) in brr"
                :key="index"
                >
                <img :src="item.avatar | tupian(item.avatar)" alt="" :onerror="errorimg">
                <div class="box1">
                    <p>{{item.cnm}}</p>
                    <p>{{item.desc}}</p>
                </div>
                </li>
            </ul>
        </div>
    </div>
</template>
<script>
export default {
    props:{
        brr:{
            typeof:Array
        }
    },
    filters:{
        tupian(a){
            
         let aa =   a.replace("w.h","80.112")
         return aa

        }
    },
    data(){
        return{
             errorimg:'this.src="'+require('@/assets/images/dita.gif')+'"',//备用图片
        }
    },
    created(){
        // console.log(this.brr);
    }
}
</script>
<style lang="less" scoped>
.box{
     .actor{
    
        .actor-box{
            display: flex;
            justify-content: space-between;
            font-size: 10px;
            color: #CCCCCC;
            padding: 10px 0 0 0;
            
            >div{
                &:nth-child(1){
                    color: white;
                    font-size: 15px;
                }
            }
        }
        box-sizing: border-box;
        width: 100%;
        padding: 15px;
       ul{
           display: flex;
            overflow-x: auto;
            white-space: nowrap;
            // overflow: hidden;
             &::-webkit-scrollbar {
             display: none;
                   }
           li{
               margin: 10px;
               margin-right: 0px;
                width: 100%;
                width: 80px;
            
               img{
                   width: 80px;
                   height: 112px;
               }
               .box1{
                   font-size: 10px;
                   color: white;
                   text-align: center;
                   >p{
                       text-align: center;
                        // 文字隐藏。。。
                         overflow:hidden;
                        text-overflow:ellipsis; 
                        &:nth-child(2){
                            opacity:0.4
                        }

                   }
               }
           }
       }
    }
}
</style>